Initialization and Pausing

Whenever you change something in a model, whether it is an equation in the model window or a slider on a published interface, the change is recorded and then used for computation. In Stella Live, the change is made and the entire model rerun. If the model is running, the change takes effect immediately and will alter the trajectory (Flight Simulation Mode) or cause the model to pause (regular simulation on the Interface). If the model is paused, the change is applied to flows and converters for the current time. If the model is idle, the change is used to determine the initial values of all model variables.

For more discussion of the overall computation process used when simulating see How model equations are solved.

Initialization

As you are building a model, or changing variables in a model, Stella will continually try to compute the equations to find the initial values for everything. This is not always possible, since not all equations may be defined, but Stella will compute those that it can. These computed values are the initial values that will be reported when the model is run.

Note This computation during initialization is very similar to what happens when paused, as described above, except that when a model is paused the stocks will never change, only the flows and converters will.

In the Model Window

When initial results are computed, you can see them by hovering over a variable. If the variable is in a numeric display or a table the value also be displayed there (flows will not always appear in tables depending on the table settings).

Once you have run the model, the results you see will be from that run. The initialization will continue in the background, but you will not see the values. In order to see the initialization results, you will need to reset outputs, or restore all devices.

On the Interface

The same updating happens on the interface whenever a user changes values through sliders, typing in text or using another input control. By default, however, these changing values are not displayed to the user. Instead, the values computed when the model was first initialized (by a starting a new run, restoring outputs or simply starting the interface) will be displayed. Some of the output devices can, however, display the results of the underlying computations. This can be done with numeric displays, status indicators, gauges, animation controls, spatial maps, and button conditionals. The option that enables this is labeled "Update on user input when paused." If this check box is checked then each time the user makes a change, the updated value will be used by the object - it will be displayed or used as a basis for enabling or disabling actions on a button.

While a model is running, and after it has been run, these updates will not occur. Similarly, if you publish a model with existing runs, the value from the last run will be displayed.

Hint To get the values to respond to user changes if you publish a model with existing runs use an opening screen and then in the button to move to the screen displaying controls add a New Run command.

Pausing

A simulation can be paused by specifying a pause interval in Model Settings Properties Panel, by clicking on the pause button in the Run Toolbar, because of Simulation Events that trigger during the simulation, or by clicking on a Button (Interface) configured to pause the simulation.

Once the simulation is paused, changing any variable value will trigger a new computation. This computation involves all of the flows and converters, but (unlike computation during initialization) not the stocks.

In the Model Window

In the model window the currently computed value for all flows and converters is always shown everywhere. This includes tool tips, numeric displays, graphs and tables. As you spin a knob, or change something using the Parameter Control Panel , the last value in tables and graphs will update. When you resume, the values you see will remain the same.

On the Interface

The same updating happens on the interface whenever a user changes values through sliders, typing in text or using another input control. By default, however, these changing values are not displayed to the user. Instead, the values computed when the model was paused will be displayed. Some of the output devices can, however, display the results of the updated computations. This can be done with numeric displays, status indicators, gauges, animation controls, spatial maps, and button conditionals. The option that enables this is labeled "Update on user input when paused." If this check box is checked then each time the user makes a change, the updated value will be used by the object - it will be displayed or used as a basis for enabling or disabling actions on a button.

While a model is running, and after it has been run, these updates will not occur.